import request2 from '@/utils/request2'
import { safetyApiUrl } from '@/api/config'

export default {
  list(params, data) {
    return request2({
      url: safetyApiUrl + '/cons-cata/findListByMain', method: 'post', params, data
    })
  },
  findListByDetails(params, data) {
    return request2({
      url: safetyApiUrl + '/cons-cata/findListByDetails', method: 'post', params, data
    })
  },
  add(params, data) {
    return request2({
      url: safetyApiUrl + '/cons-cata/createByMain', method: 'post', params, data
    })
  },
  edit(params, data) {
    return request2({
      url: safetyApiUrl + '/cons-cata/editByMain', method: 'put', params, data
    })
  },
  del(data) {
    return request2({
      url: safetyApiUrl + '/cons-cata/deleteByMain', method: 'delete', data
    })
  },
  addDetail(params, data) {
    return request2({
      url: safetyApiUrl + '/cons-cata/createByDetail', method: 'post', params, data
    })
  },
  editDetail(params, data) {
    return request2({
      url: safetyApiUrl + '/cons-cata/editByDetail', method: 'put', params, data
    })
  },
  delDetail(data) {
    return request2({
      url: safetyApiUrl + '/cons-cata/deleteByDetail', method: 'delete', data
    })
  }
}